import { Injectable } from '@nestjs/common';
import Payment from 'node-easywechat/dist/Payment/Application';

@Injectable()
export class PayService {
    payClient = new Payment({
        // 应用的 app_id
       app_id: 'wx7075f04edc923e5b',
       // 商户号
       mch_id: '1558656881',
       // 签名密钥
       key: 'WAOXZJXHYLVHZYLLNUDWABGAXUHIQQAD',//APIV3:'7Q6SHV94NFHYORXGEJ8E4XQPMC3TK0GS',
       apiv3_key: '7Q6SHV94NFHYORXGEJ8E4XQPMC3TK0GS',
       // 默认回调地址，也可以在下单时单独设置来覆盖它，完整URL，不带参数
       notify_url: 'https://www.apesk.net/api/common/wxpay/callback/',
       cert_path:'/www/wwwroot/nest.apesk.net/cert/wxpay/apiclient_cert.p12',
       //sandbox : true
   })
}
